package com.ruoyi.system.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.SysAimodelMapper;
import com.ruoyi.system.domain.SysAimodel;
import com.ruoyi.system.service.ISysAimodelService;

/**
 * 模特基础信息Service业务层处理
 * 
 * @author ruoyi
 * @date 2024-11-20
 */
@Service
public class SysAimodelServiceImpl implements ISysAimodelService 
{
    @Autowired
    private SysAimodelMapper sysAimodelMapper;

    /**
     * 查询模特基础信息
     * 
     * @param id 模特基础信息主键
     * @return 模特基础信息
     */
    @Override
    public SysAimodel selectSysAimodelById(Long id)
    {
        return sysAimodelMapper.selectSysAimodelById(id);
    }

    /**
     * 查询模特基础信息列表
     * 
     * @param sysAimodel 模特基础信息
     * @return 模特基础信息
     */
    @Override
    public List<SysAimodel> selectSysAimodelList(SysAimodel sysAimodel)
    {
        return sysAimodelMapper.selectSysAimodelList(sysAimodel);
    }

    /**
     * 新增模特基础信息
     * 
     * @param sysAimodel 模特基础信息
     * @return 结果
     */
    @Override
    public int insertSysAimodel(SysAimodel sysAimodel)
    {
        sysAimodel.setCreateTime(DateUtils.getNowDate());
        return sysAimodelMapper.insertSysAimodel(sysAimodel);
    }

    /**
     * 修改模特基础信息
     * 
     * @param sysAimodel 模特基础信息
     * @return 结果
     */
    @Override
    public int updateSysAimodel(SysAimodel sysAimodel)
    {
        sysAimodel.setUpdateTime(DateUtils.getNowDate());
        return sysAimodelMapper.updateSysAimodel(sysAimodel);
    }

    /**
     * 批量删除模特基础信息
     * 
     * @param ids 需要删除的模特基础信息主键
     * @return 结果
     */
    @Override
    public int deleteSysAimodelByIds(Long[] ids)
    {
        return sysAimodelMapper.deleteSysAimodelByIds(ids);
    }

    /**
     * 删除模特基础信息信息
     * 
     * @param id 模特基础信息主键
     * @return 结果
     */
    @Override
    public int deleteSysAimodelById(Long id)
    {
        return sysAimodelMapper.deleteSysAimodelById(id);
    }
}
